using System;
using System.Collections.Generic;
using System.Text;
using Directory.Model;
using System.Data;

namespace Directory.IDAL
{
	public interface ICategory
	{
		CategoryInfo CreateCategory(string categoryName, int parentCategoryId, string description, string marker, int order, out CategoryInfo.ErrorCode ErrorCode);
		CategoryInfo GetCateogryInfo(int categoryId);
		void DeleteCategory(int categoryId, out CategoryInfo.ErrorCode ErrorCode);
		void UpdateCategory(CategoryInfo category, out CategoryInfo.ErrorCode ErrorCode);
		IList<CategoryInfo> GetChildsOfCategory(int categoryId);
		IList<CategoryInfo> GetRootCategoriesForUser(string username);
		IList<CategoryUser> GetUsersForCategory(int categoryId, int pageIndex, int pageSize, out int totalRecords);
		void AddUserToCategory(string username, int categoryId);
		void RemoveUserFromCategory(string username, int categoryId);
		IList<CategoryInfo> GetRecursiveChildCategoriesForUser(string username);
		IList<CategoryInfo> GetRecursiveParentsOfCategory(int categoryId, int baseCategoryId);
		IList<CategoryInfo> GerRecommandCategories(bool isRecommand, int pageIndex, int pageSize, out int totalRecords);
		void SetCategoryRecommandState(int categoryId, bool isRecommand);
		int GetCategoriesCount(int rootCategoryId);
		DataSet GetExportDataSet(int categoryId);
		IList<CategoryInfo> SearchCategories(string keywords, int pageIndex, int pageSize, out int totalRecords);
	}
}
